home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / include / Xm / DragCP.h.z / DragCP.h
Encoding:
C/C++ Source or Header  |  2003-11-18  |  6.0 KB  |  228 lines

  1. /*
  2.  * DragCP.h
  3.  *
  4.  * Copyright 2000, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* 
  26.  * @OSF_COPYRIGHT@
  27.  * (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
  28.  * ALL RIGHTS RESERVED
  29.  *  
  30. */ 
  31. /*
  32.  * HISTORY
  33.  * Motif Release 1.2.5
  34. */
  35. /*   $XConsortium: DragCP.h /main/cde1_maint/2 1995/08/18 18:58:18 drk $ */
  36. /*
  37. *  (c) Copyright 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  38. #ifndef _XmDragCP_h
  39. #define _XmDragCP_h
  40.  
  41. #include <Xm/XmP.h>
  42. #include <Xm/DragC.h>
  43.  
  44. #include <X11/Shell.h>
  45. #include <X11/ShellP.h>
  46.  
  47. #include <Xm/DragIcon.h>
  48. #include <Xm/DragOverS.h>
  49. #include <Xm/DropSMgrP.h>
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55.  
  56. /***********************************************************************
  57.  *
  58.  * DragContext (RootWrapper) Widget Private Data
  59.  *
  60.  ***********************************************************************/
  61.  
  62. #ifdef _NO_PROTO
  63. typedef void    (*XmDragStartProc)();
  64. typedef void     (*XmDragCancelProc)();
  65. #else
  66. typedef void    (*XmDragStartProc)( XmDragContext, Widget, XEvent *);
  67. typedef void     (*XmDragCancelProc)( XmDragContext) ;
  68. #endif /* _NO_PROTO */
  69.  
  70.  
  71. #define _XmDragStart(dc, srcW, event) \
  72.   (*((XmDragContextClass)XtClass(dc))->drag_class.start)\
  73.   (dc, srcW, event)
  74.  
  75. #define _XmDragCancel(dc) \
  76.   (*((XmDragContextClass)XtClass(dc))->drag_class.cancel)\
  77.   (dc)
  78.  
  79. typedef struct {
  80.     XmDragStartProc        start;
  81.     XmDragCancelProc        cancel;
  82.     XtPointer               extension;
  83. } XmDragContextClassPart;
  84.  
  85. typedef struct _XmDragContextClassRec {
  86.     CoreClassPart              core_class;
  87.     XmDragContextClassPart    drag_class;
  88. } XmDragContextClassRec;
  89.  
  90. externalref XmDragContextClassRec xmDragContextClassRec;
  91.  
  92. #define XtDragByPoll     0
  93. #define XtDragByEvent    1
  94.  
  95. typedef struct {
  96.     Window        frame;
  97.     Window        window;
  98.     Widget        shell;
  99.     unsigned char    flags;
  100.     unsigned char    dragProtocolStyle;
  101.     int            xOrigin, yOrigin;
  102.     unsigned int    width, height;
  103.     unsigned int    depth;
  104.     XtPointer        iccInfo;
  105. } XmDragReceiverInfoStruct, *XmDragReceiverInfo;
  106.  
  107.  
  108. typedef union _XmConvertSelectionRec
  109.   {
  110.     XtConvertSelectionIncrProc sel_incr ;
  111.     XtConvertSelectionProc     sel ;
  112.   } XmConvertSelectionRec ;
  113.   
  114.  
  115. typedef struct _XmDragContextPart{
  116.     /****  resources ****/
  117.  
  118.     Atom            *exportTargets;
  119.     Cardinal            numExportTargets;
  120.     XmConvertSelectionRec    convertProc;
  121.     XtPointer            clientData;
  122.     XmDragIconObject        sourceCursorIcon;
  123.     XmDragIconObject        stateCursorIcon;
  124.     XmDragIconObject        operationCursorIcon;
  125.     XmDragIconObject        sourcePixmapIcon;
  126.     Pixel            cursorBackground;
  127.     Pixel            cursorForeground;
  128.     Pixel            validCursorForeground;
  129.     Pixel            invalidCursorForeground;
  130.     Pixel            noneCursorForeground;
  131.     XtCallbackList        dragMotionCallback;
  132.     XtCallbackList        operationChangedCallback;
  133.     XtCallbackList        siteEnterCallback;
  134.     XtCallbackList        siteLeaveCallback;
  135.     XtCallbackList        topLevelEnterCallback;
  136.     XtCallbackList        topLevelLeaveCallback;
  137.     XtCallbackList        dropStartCallback;
  138.     XtCallbackList        dropFinishCallback;
  139.     XtCallbackList        dragDropFinishCallback;
  140.     unsigned char        dragOperations;
  141.     Boolean            incremental;
  142.     unsigned char        blendModel;
  143.  
  144.     /* private resources */
  145.     Window            srcWindow;
  146.     Time            dragStartTime;
  147.     Atom            iccHandle;
  148.     Widget            sourceWidget;
  149.     Boolean            sourceIsExternal;
  150.  
  151.     /**** instance data ****/
  152.     Boolean            topWindowsFetched;
  153.     unsigned char         commType;
  154.     unsigned char        animationType;
  155.  
  156.     unsigned char        operation;
  157.     unsigned char        operations;
  158.     unsigned int        lastEventState;
  159.     unsigned char        dragCompletionStatus;
  160.     unsigned char        dragDropCompletionStatus;
  161.     Boolean            forceIPC;
  162.     Boolean            serverGrabbed;
  163.     Boolean            useLocal;
  164.     Boolean            inDropSite;
  165.     XtIntervalId         dragTimerId;
  166.     
  167.     Time            roundOffTime;
  168.     Time            lastChangeTime;
  169.     Time            crossingTime;
  170.  
  171.     Time            dragFinishTime;
  172.     Time            dropFinishTime;
  173.     
  174.     Atom            dropSelection;
  175.     Widget            srcShell;
  176.     Position        startX, startY;
  177.  
  178.     XmID            siteID;
  179.  
  180.     Screen            *currScreen;
  181.     Window            currWmRoot;
  182.     XmDragOverShellWidget    curDragOver;
  183.     XmDragOverShellWidget    origDragOver;
  184.  
  185.     XmDragReceiverInfoStruct    *currReceiverInfo;
  186.     XmDragReceiverInfoStruct    *rootReceiverInfo;
  187.     XmDragReceiverInfoStruct    *receiverInfos;
  188.     Cardinal            numReceiverInfos;
  189.     Cardinal            maxReceiverInfos;
  190.  
  191.     unsigned char        trackingMode;
  192.     unsigned char        activeProtocolStyle;
  193.     unsigned char               activeBlendModel;
  194.     Boolean            dragDropCancelEffect;
  195. } XmDragContextPart;
  196.  
  197.  
  198. typedef  struct _XmDragContextRec{
  199.     CorePart             core;
  200.     XmDragContextPart        drag;
  201. } XmDragContextRec;
  202.  
  203. #define _XmDCtoDD(dc) ((XmDisplay)XtParent(dc))
  204.  
  205.  
  206. /********    Private Function Declarations    ********/
  207. #ifdef _NO_PROTO
  208.  
  209. extern XmDragReceiverInfo _XmAllocReceiverInfo() ;
  210. extern unsigned char _XmGetActiveProtocolStyle() ;
  211.  
  212. #else
  213.  
  214. extern XmDragReceiverInfo _XmAllocReceiverInfo( 
  215.                         XmDragContext dc) ;
  216. extern unsigned char _XmGetActiveProtocolStyle( 
  217.                         Widget w) ;
  218.  
  219. #endif /* _NO_PROTO */
  220. /********    End Private Function Declarations    ********/
  221.  
  222.  
  223. #ifdef __cplusplus
  224. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  225. #endif
  226.  
  227. #endif /* _XmDragCP_h */
  228.